MyDesktop.BeautyNotePad = Ext.extend(Ext.app.Module, {
	id:'3',
    init : function(){
        this.launcher = {
            text: '记事本',
            iconCls:'bogus',
            handler : this.createWindow,
            scope: this
        }
    },

    createWindow : function(){
    	var desktop = this.app.getDesktop();
        var win = desktop.getWindow('3');
	    if(!win) {    
	    	win = desktop.createWindow({
				 title:'记事本',
		        //layout:'border',
		        width:640,
		        height:480,
				id:'3',
		        items:
		        	new Ext.FormPanel({
						tbar:[{
							text:'保存',
							tooltip:'save the file',
							iconCls:'save',
							handler:function() {
								Ext.get('notepad').getForm().findField('notepadContent').setValue('Hello xiudong!');	
							}
						},'-',{
							text:'打开',
							tooltip:'open a file',
							iconCls:'open'
						},'-',{
							text:'新建',
							tooltip:'touch a new file',
							iconCls:'new'
						}],
		        		items :[{
			        		xtype: 'htmleditor',
							name: 'notepadContent',
							hideLabel: true,
							labelSeparator: '',
							anchor: '100%'
		        			}]
		        		})
	    	});
	    	win.show();
			if(win) {
				updateAppStatues(win.id,'on');
			}
	    }
    }
	 
});
